//
// Created by jsjxsy on 2022/9/1.
//

#ifndef CPLUSPLUS_DEMO_CLASS_EXTEND_INCLUDE_01_14_5_EXCE_H_
#define CPLUSPLUS_DEMO_CLASS_EXTEND_INCLUDE_01_14_5_EXCE_H_
#include <string>
#include <iostream>
using namespace std;
class abstr_emp {
 private:
  std::string fname;
  std::string lname;
  std::string job;
 public:
  abstr_emp();
  abstr_emp(const std::string &fn, const std::string &ln, const std::string &j);
  abstr_emp(const abstr_emp &ae);
  virtual void ShowAll() const;
  virtual void setAll();
  friend std::ostream &operator<<(std::ostream &os, const abstr_emp &e);
  virtual ~abstr_emp()=0;
};

//===============================================

class employee : public abstr_emp {
 public:
  employee();
  employee(const std::string &fn, const std::string &ln, const std::string &j);
  virtual void ShowAll() const;
  virtual void setAll();
  ~employee() {}
};
//===============================================

class manager : virtual public abstr_emp {
 private:
  int inchargeof;
 protected:
  int InChargeOf() const { return inchargeof; }
  int &InChargeOf() { return inchargeof; }
 public:
  manager();
  manager(const std::string &fn, const std::string &ln, const std::string &j, int ico = 0);
  manager(const abstr_emp &e, int ico);
  manager(const manager &m);
  virtual void ShowAll() const;
  virtual void setAll();
  ~manager() {}
};
//===============================================

class fink : virtual public abstr_emp {
 private:
  std::string reportsto;
 protected:
  const std::string ReportsTo() const { return reportsto; }
  std::string &ReportsTo() { return reportsto; }
 public:
  fink();
  fink(const std::string &fn, const std::string &ln, const std::string &j, const std::string &rpo);
  fink(const abstr_emp &e, const std::string &rpo);
  fink(const fink &f);
  virtual void ShowAll() const;
  virtual void setAll();
  ~fink() {}
};
//===============================================

class highfink : public manager, public fink {
 public:
  highfink();
  highfink(const std::string &fn, const std::string &ln, const std::string &j, const std::string &rpo, int ico);
  highfink(const abstr_emp &e, const std::string &rpo, int ico);
  highfink(const fink &f, int ico);
  highfink(const manager &m, const std::string &rpo);
  highfink(const highfink &h);
  virtual void ShowAll() const;
  virtual void setAll();
  ~highfink() {}
};
#endif //CPLUSPLUS_DEMO_CLASS_EXTEND_INCLUDE_01_14_5_EXCE_H_
